<?php defined('IN_IA') or exit('Access Denied');?><!DOCTYPE html>
<html lang="en">
<head>
    <?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/edithead', TEMPLATE_INCLUDEPATH)) : (include template('common/edithead', TEMPLATE_INCLUDEPATH));?>
    <!--系统 -->
    <!--这个放在最后一切平白安全-->
    <script type="text/javascript" src="./resource/js/require.js?v=20170915"></script>
    <style>
        .sort_status{overflow: hidden;position: absolute;top:0;left: 100%;width: 62px;height: 32px;padding-left: 10px;text-align: left;}
    </style>
</head>
<body class="nav-md" style="min-width: 800px">
<div>
    <div class="container xc_edit_from" >
        <div class="main_container" style="overflow-x: hidden;min-height: calc(100vh - 20px);background-color: white;width: 100%;">
            <div class="col-md-12 col-xs-12">
                <div class="x_panel">
                    <?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('mymanage/webconfig/nav', TEMPLATE_INCLUDEPATH)) : (include template('mymanage/webconfig/nav', TEMPLATE_INCLUDEPATH));?>
                    <div class="x_content">
                        <br/>
                        <form class="form-horizontal" role="form" method="post" action="" name="submit">
                            <div class="form-group">
                                <label for="name" class="col-sm-2 control-label">名称</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="name" id="name" value="<?php  echo $list['name'];?>">
                                    <input type="hidden" name="id" value="<?php  echo $list['id'];?>">
                                    <input type="hidden" name="sort">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">标题</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="title" id="title" value="<?php  echo $list['content']['title'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3 col-xs-12">客服模块消息配制</label>
                                <div class="col-md-10 col-sm-9 col-xs-12">
                                    <input type="text" class="form-control" placeholder="模块消息" name="xcmessage" value="<?php  echo $list['content']['xcmessage'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">流量主</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="ad_status"
                                           data-value="<?php  echo $list['content']['ad_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">广告单元id</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="unit_id" id="unit_id" value="<?php  echo $list['content']['unit_id'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">客服功能</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="online_status"
                                           data-value="<?php  echo $list['content']['online_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">客服图标（100*100）</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('online_simg',$list['content']['online_simg']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">今日要闻图标（100*100）</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('news_icon',$list['content']['news_icon']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">今日要闻文字自定义</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="news_title" id="news_title" value="<?php  echo $list['content']['news_title'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">热门课程文字自定义</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="ke_name" id="ke_name" value="<?php  echo $list['content']['ke_name'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">热门商品文字自定义</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_name" id="service_name" value="<?php  echo $list['content']['service_name'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">任课教师文字自定义</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_teacher" id="service_teacher" value="<?php  echo $list['content']['service_teacher'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">课程内容文字自定义</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_detail" id="service_detail" value="<?php  echo $list['content']['service_detail'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">课程列表学期文字</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_list1" id="service_list1" value="<?php  echo $list['content']['service_list1'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">课程列表课时文字</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_list2" id="service_list2" value="<?php  echo $list['content']['service_list2'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">课程列表学费文字</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_list3" id="service_list3" value="<?php  echo $list['content']['service_list3'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">课程列表课程详情文字</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_list4" id="service_list4" value="<?php  echo $list['content']['service_list4'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">预约试听文字</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="service_list5" id="service_list5" value="<?php  echo $list['content']['service_list5'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">管理中心功能</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="store_status"
                                           data-value="<?php  echo $list['content']['store_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学期课时</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="ke_status"
                                           data-value="<?php  echo $list['content']['ke_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">首页课程价格</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="index_service_price"
                                           data-value="<?php  echo $list['content']['index_service_price'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">导航关闭</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="nav_status"
                                           data-value="<?php  echo $list['content']['nav_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">IOS虚拟支付关闭</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="pay_ios"
                                           data-value="<?php  echo $list['content']['pay_ios'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">地址关闭</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="map_status"
                                           data-value="<?php  echo $list['content']['map_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">点名功能</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="sign_status"
                                           data-value="<?php  echo $list['content']['sign_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">运费</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="fee" id="fee" value="<?php  echo $list['content']['fee'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">版权</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="copyright" id="copyright" value="<?php  echo $list['content']['copyright'];?>">
                                </div>
                            </div>
                            <div class="form-group" style="display: none;">
                                <label  class="col-sm-2 control-label">首页图片(375*250)</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('wwww');?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">报名顶部图片</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('sign_bimg',$list['content']['sign_bimg']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">砍价顶部图片</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_multi_image('cut_bimg',$list['content']['cut_bimg']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">砍价分享标题</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="cut_share" id="cut_share" value="<?php  echo $list['content']['cut_share'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">团购顶部图片</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_multi_image('group_bimg',$list['content']['group_bimg']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">公开课图片(375*130)</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('g_class',$list['content']['g_class']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">新开课图片(375*130)</label>
                                <div class="col-sm-8">
                                    <?php  echo tpl_form_field_image('x_class',$list['content']['x_class']);?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">单次预约人数限制</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="online_limit" id="online_limit" value="<?php  echo $list['content']['online_limit'];?>">
                                    <span class="help-block">不填不限制</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">报名次数限制</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="sign_limit" id="sign_limit" value="<?php  echo $list['content']['sign_limit'];?>">
                                    <span class="help-block">不填不限制</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">评论功能</label>
                                <div class="col-sm-8">
                                    <label class="radio inline">
                                        <input type="checkbox" class="ui-radio" name="comment_service" value="1" <?php  if($list['content']['comment_service']==1) { ?>checked<?php  } ?>>课程
                                    </label>
                                    <label class="radio inline">
                                        <input type="checkbox" class="ui-radio" name="comment_video" value="1" <?php  if($list['content']['comment_video']==1) { ?>checked<?php  } ?>>视频
                                    </label>
                                    <label class="radio inline">
                                        <input type="checkbox" class="ui-radio" name="comment_audio" value="1" <?php  if($list['content']['comment_audio']==1) { ?>checked<?php  } ?>>音频
                                    </label>
                                    <label class="radio inline">
                                        <input type="checkbox" class="ui-radio" name="comment_line" value="1" <?php  if($list['content']['comment_line']==1) { ?>checked<?php  } ?>>礼包
                                    </label>
                                    <label class="radio inline">
                                        <input type="checkbox" class="ui-radio" name="comment_group" value="1" <?php  if($list['content']['comment_group']==1) { ?>checked<?php  } ?>>团购
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">商城配送方式</label>
                                <div class="col-sm-8">
                                    <label class="radio inline">
                                        <input type="radio" class="ui-radio" name="mall_pei_type" value="-1" <?php  if($list['content']['mall_pei_type']==-1) { ?>checked<?php  } ?>>商家配送或自提
                                    </label>
                                    <label class="radio inline">
                                        <input type="radio" class="ui-radio" name="mall_pei_type" value="1" <?php  if($list['content']['mall_pei_type']==1) { ?>checked<?php  } ?>>商家配送
                                    </label>
                                    <label class="radio inline">
                                        <input type="radio" class="ui-radio" name="mall_pei_type" value="2" <?php  if($list['content']['mall_pei_type']==1) { ?>checked<?php  } ?>>自提
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">预定成功模板<br/>（ID AT0104）</label>
                                <div class="col-sm-8">
                                    <input type="text" placeholder="(姓名、电话、项目、时间)" class="form-control"  name="template_id" id="template_id" value="<?php  echo $list['content']['template_id'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">特约商户</label>
                                <div class="col-sm-8">
                                    <input type="checkbox" class="js-switch" value="1" name="sub_status"
                                           data-value="<?php  echo $list['content']['sub_status'];?>" data-field="status">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">服务商ID</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" placeholder="服务商ID" name="sub_appid" value="<?php  echo $list['content']['sub_appid'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">商户号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" placeholder="商户号" name="sub_mch_id" value="<?php  echo $list['content']['sub_mch_id'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">支付秘钥</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" placeholder="支付秘钥" name="sub_key" value="<?php  echo $list['content']['sub_key'];?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">底部导航<br/>（图标50*50）</label>
                                <div class="col-sm-8">
                                    <div style="position: relative;">
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[0][icon]" value="<?php  echo $list['content']['footer'][0]['icon'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（未选）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][0]['icon'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[0][select]" value="<?php  echo $list['content']['footer'][0]['select'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（选中）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][0]['select'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                            <span class="input-group-btn">
                            <button class="btn btn-default" type="button">底部文字</button>
                            </span>
                                            <input type="text" name="footer[0][text]" value="<?php  echo $list['content']['footer'][0]['text'];?>" class="form-control">
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <input type="text" name="footer[0][link]" value="<?php  echo $list['content']['footer'][0]['link'];?>" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default link" type="button" data-toggle="modal" data-target="#selectUrl">选择链接</button>
                            </span>
                                        </div>
                                        <div class="sort_status">
                                            <input type="checkbox" class="js-switch" value="1" name="footer[0][status]"
                                                   data-value="<?php  echo $list['content']['footer'][0]['status'];?>" data-field="status">
                                        </div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div style="margin-top: 10px;position: relative;">
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group ">
                                                <input type="text" name="footer[1][icon]" value="<?php  echo $list['content']['footer'][1]['icon'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（未选）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][1]['icon'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[1][select]" value="<?php  echo $list['content']['footer'][1]['select'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（选中）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][1]['select'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                            <span class="input-group-btn">
                            <button class="btn btn-default" type="button">底部文字</button>
                            </span>
                                            <input type="text" name="footer[1][text]" value="<?php  echo $list['content']['footer'][1]['text'];?>" class="form-control">
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <input type="text" name="footer[1][link]" value="<?php  echo $list['content']['footer'][1]['link'];?>" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default link" type="button" data-toggle="modal" data-target="#selectUrl">选择链接</button>
                            </span>
                                        </div>
                                        <div class="sort_status">
                                            <input type="checkbox" class="js-switch" value="1" name="footer[1][status]"
                                                   data-value="<?php  echo $list['content']['footer'][1]['status'];?>" data-field="status">
                                        </div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div style="margin-top: 10px;position: relative;">
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[2][icon]" value="<?php  echo $list['content']['footer'][2]['icon'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（未选）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][2]['icon'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[2][select]" value="<?php  echo $list['content']['footer'][2]['select'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（选中）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][2]['select'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                            <span class="input-group-btn">
                            <button class="btn btn-default" type="button">底部文字</button>
                            </span>
                                            <input type="text" name="footer[2][text]" value="<?php  echo $list['content']['footer'][2]['text'];?>" class="form-control">
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <input type="text" name="footer[2][link]" value="<?php  echo $list['content']['footer'][2]['link'];?>" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default link" type="button" data-toggle="modal" data-target="#selectUrl">选择链接</button>
                            </span>
                                        </div>
                                        <div class="sort_status">
                                            <input type="checkbox" class="js-switch" value="1" name="footer[2][status]"
                                                   data-value="<?php  echo $list['content']['footer'][2]['status'];?>" data-field="status">
                                        </div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div style="margin-top: 10px;position: relative;">
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[3][icon]" value="<?php  echo $list['content']['footer'][3]['icon'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（未选）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][3]['icon'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[3][select]" value="<?php  echo $list['content']['footer'][3]['select'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（选中）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][3]['select'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                            <span class="input-group-btn">
                            <button class="btn btn-default" type="button">底部文字</button>
                            </span>
                                            <input type="text" name="footer[3][text]" value="<?php  echo $list['content']['footer'][3]['text'];?>" class="form-control">
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <input type="text" name="footer[3][link]" value="<?php  echo $list['content']['footer'][3]['link'];?>" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default link" type="button" data-toggle="modal" data-target="#selectUrl">选择链接</button>
                            </span>
                                        </div>
                                        <div class="sort_status">
                                            <input type="checkbox" class="js-switch" value="1" name="footer[3][status]"
                                                   data-value="<?php  echo $list['content']['footer'][3]['status'];?>" data-field="status">
                                        </div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div style="margin-top: 10px;position: relative;">
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[4][icon]" value="<?php  echo $list['content']['footer'][4]['icon'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（未选）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][4]['icon'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <div class="input-group">
                                                <input type="text" name="footer[4][select]" value="<?php  echo $list['content']['footer'][4]['select'];?>" class="form-control" autocomplete="off">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showImageDialog(this);">图标（选中）</button>
                                </span>
                                            </div>
                                            <div class="input-group " style="margin-top:.5em;">
                                                <img src="<?php  echo tomedia($list['content']['footer'][4]['select'])?>" onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" style="width: 50px;height: 50px;">
                                                <em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
                                            </div>
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                            <span class="input-group-btn">
                            <button class="btn btn-default" type="button">底部文字</button>
                            </span>
                                            <input type="text" name="footer[4][text]" value="<?php  echo $list['content']['footer'][4]['text'];?>" class="form-control">
                                        </div>
                                        <div class="input-group" style="width: 50%;float:left;">
                                            <input type="text" name="footer[4][link]" value="<?php  echo $list['content']['footer'][4]['link'];?>" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default link" type="button" data-toggle="modal" data-target="#selectUrl">选择链接</button>
                            </span>
                                        </div>
                                        <div class="sort_status">
                                            <input type="checkbox" class="js-switch" value="1" name="footer[4][status]"
                                                   data-value="<?php  echo $list['content']['footer'][4]['status'];?>" data-field="status">
                                        </div>
                                        <div style="clear: both;"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <input type="button" name="submit" class="btn btn-default" value="提交">
                                    <button class="btn btn-primary upsql" type="button">一键更新</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--底部链接选择-->
<div class="modal fade" id="selectUrl"><div class="modal-dialog">
    <style>
        #selectUrl .modal-body {padding: 10px 15px;}
        #selectUrl .tab-pane {margin-top: 5px; min-height: 400px; max-height: 400px; overflow-y: auto;}
        #selectUrlTab{margin-bottom: 10px;}
    </style>
    <div class="modal-content">
        <div class="modal-header">
            <button data-dismiss="modal" class="close" type="button">×</button>
            <h4 class="modal-title">选择链接</h4>
        </div>
        <div class="modal-body">
            <ul class="nav nav-tabs" id="selectUrlTab">
                <li role="presentation" class="active"><a href="#sut_shop">页面</a></li>
                <li role="presentation"><a href="#sut_app">小程序</a></li>
                <li role="presentation"><a href="#sut_class">分类</a></li>
            </ul>
            <div class="tab-content ">
                <div class="tab-pane active" id="sut_shop">
                    <nav data-dismiss="modal" data-href="/xc_train/pages/index/index" class="btn btn-default btn-sm" title="首页">首页</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/active/list" class="btn btn-default btn-sm" title="优惠活动">优惠活动</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/video/video" class="btn btn-default btn-sm" title="视频">视频</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/user/user" class="btn btn-default btn-sm" title="我的">我的</nav>
                    <!--<nav data-dismiss="modal" data-href="/xc_train/pages/news/news" class="btn btn-default btn-sm" title="新闻">新闻</nav>-->
                    <nav data-dismiss="modal" data-href="/xc_train/pages/contact/contact" class="btn btn-default btn-sm" title="联系我们">联系我们</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/service/index" class="btn btn-default btn-sm" title="课程">课程</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/coupon/coupon" class="btn btn-default btn-sm" title="优惠券">优惠券</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/cut/list" class="btn btn-default btn-sm" title="砍价">砍价</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/mall/mall" class="btn btn-default btn-sm" title="商城">商城</nav>
                    <nav data-dismiss="modal" data-href="/xc_train/pages/audio/list" class="btn btn-default btn-sm" title="音频">音频</nav>
                     <nav data-dismiss="modal" data-href="/xc_train/pages/score/index/index" class="btn btn-default btn-sm" title="积分商城">积分商城</nav>
                </div>
                <div class="tab-pane" id="sut_app">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label  class="col-sm-2 control-label">小程序 appId</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  name="appId" id="appId">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <input data-dismiss="modal" type="button" name="app_btn" class="btn btn-default" value="确定">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="tab-pane" id="sut_class">
                    <iframe width="100%" height="395" frameborder="no" border="0" scrolling="no" allowtransparency="yes" src="<?php  echo url('site/entry/nav',array('m'=>$_GPC['m'],'op'=>'pclass','version_id'=>$_GPC['version_id']));?>"></iframe>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button data-dismiss="modal" class="btn btn-default" id="select-close" type="button">关闭</button>
        </div>
        <script>
            var obj='';
            $(function(){
                $(".link").click(function(){
                    obj=this;
                });
                $("#selectUrl").find('#selectUrlTab a').click(function(e) {
                    $('#tab').val($(this).attr('href'));
                    e.preventDefault();
                    $(this).tab('show');
                });
                $("#sut_shop").find("nav").click(function(){
                    $(obj).parent().prev().val($(this).attr("data-href"));
                });
                $("input[name='app_btn']").click(function(){
                    var appid=$("input[name='appId']").val();
                    if(appid!=""){
                        $(obj).parent().prev().val(appid);
                    }
                });
            });
        </script>
    </div>
</div></div>
<!--底部链接选择 end-->
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/editfoot', TEMPLATE_INCLUDEPATH)) : (include template('common/editfoot', TEMPLATE_INCLUDEPATH));?>
<script>
    $(function(){
        $("input[name='submit']").click(function(){
            var data=$(".form-horizontal").serialize();
            $.ajax({
                type:"post",
                url:"<?php  echo url('site/entry/'.$_GPC['do'],array('m'=>$_GPC['m'],'op'=>'savemodel','version_id'=>$_GPC['version_id']));?>",
                data:data,
                dataType:'json',
                success:function(res){
                    if(res.status==1){
                        swal('操作成功!', '操作成功!', 'success');
                    }else{
                        swal('操作失败!', '操作失败!', 'error');
                    }
                }
            })
        });
        $(".upsql").click(function(){
            $.ajax({
                type:"post",
                url:"<?php  echo url('site/entry/UpSql',array('m'=>$_GPC['m'],'version_id'=>$_GPC['version_id']));?>",
                dataType:'json',
                success:function(res){
                    if(res.status==1){
                        swal('更新成功!', '更新成功!', 'success');
                    }else{
                        swal('操作失败!', '操作失败!', 'error');
                    }
                }
            })
        });
    })
</script>
</body>
</html>